1. Field of the Invention
The present invention relates to memory-constrained computing devices. More specifically, the present invention relates to a method and an apparatus for facilitating faster execution of code on a memory-constrained computing device that has fast on-chip RAM.
2. Related Art
The Java 2 Platform, Micro Edition (J2ME™), has become very popular in the wireless device space. Motorola, Nokia, NTT DoCoMo, RIM, Siemens, and many other key players in the wireless device industry have recently started shipping J2ME-enabled devices in very high volume. It has been estimated that over 200 million J2ME-enabled mobile phones were shipped in 2003 alone.
However, in spite of the success of the J2ME platform, significant challenges for Java™ technology remain in the memory-constrained device space. As mobile applications become increasingly complex, execution times increase significantly. This is especially a problem because many of these cell phones, including phones that feature the ARM7TDMI processor, have no CPU cache.
At the same time, many of these memory-constrained computing devices include a limited amount of user-managed “fast” RAM. This fast RAM operates at significantly faster access rates than the main memory on the device. The lack of a cache makes code execution slow unless code is copied to fast RAM. This is especially important in the context of a dynamic adaptive compiler in a JVM, which aims at executing as much “hot code” as possible in fast RAM.
Code caching in the fast RAM is not without its drawbacks. Only a very limited amount of code fits into fast RAM, typically less than the effective working set size. Moreover, fragmentation issues arise quickly given the minimal size of fast RAM.
Hence, what is needed is a method and an apparatus for facilitating faster execution of code on a memory-constrained computing device with fast RAM, without the problems listed above.